卧龙小说网> > > 为了发布而搞得代码

为了发布而搞得代码

为了发布而搞得代码

<!DOCTYPE html> <html style=""> <head> <meta charset="UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> {title} {csp} {base} <meta name="format-detection" content="telephone=no" /> <meta name="HandheldFriendly" content="True" /> <meta name="MobileOptimized" content="320" /> <meta name="viewport" id="viewport" content="width=device-widthinitial-scale=1minimum-scale=1 maximum-scale=1 user-scalable=no viewport-fit=cover"/> <meta name="x5-fast-scroller" content="disable" /> <meta name="tags" content="sea2.1" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <link rel="Shortcut Icon" href="//qzonestyle.gtimg.cn/qzone_v6/img/favicon.ico?max_age=31536000" type="image/x-icon" /> <script> if(!window.navigator) window.navigator = {}; </script>{envData} {hybdata} <script> HYB.loadTimes.startLoad = +new Date(); </script><script data-content="<!DOCTYPE html> <html style=""> <head> <meta charset="UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> {title} {csp} {base} <meta name="format-detection" content="telephone=no" /> <meta name="HandheldFriendly" content="True" /> <meta name="MobileOptimized" content="320" /> <meta name="viewport" id="viewport" content="width=device-widthinitial-scale=1minimum-scale=1 maximum-scale=1 user-scalable=no viewport-fit=cover"/> <meta name="x5-fast-scroller" content="disable" /> <meta name="tags" content="sea2.1" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <link rel="Shortcut Icon" href="//qzonestyle.gtimg.cn/qzone_v6/img/favicon.ico?max_age=31536000" type="image/x-icon" /> <script> if(!window.navigator) window.navigator = {}; </script>{envData} {hybdata} <script> HYB.loadTimes.startLoad = +new Date(); </script><script data-content="webso"> (function() { var waitingCb = []; var done; var timeoutId; var timeout; var mdReport = { fromId: 204971707 toId: 211006088 interfaceId: HYB.browserInfo.platform === 'ios' ? 104979953 : 104979954 }; function reportMd(mdInfo opt) { mdInfo = mdInfo || {}; opt = opt || {}; if (!mdInfo || !mdInfo.fromId || !mdInfo.toId || !mdInfo.interfaceId) return; if (Math.random() >= (opt.rate || 0.1)) return; new Image().src = 'https://h5.qzone.qq.com/report/md?' + toUrlParams(mdInfo) + '&r=' + Math.random(); } function toUrlParams(obj) { var arr = [] k; for (k in obj) if (obj.hasOwnProperty(k)) arr.push(encodeURIComponent(k) + '=' + encodeURIComponent(obj[k])); return arr.join('&'); } function findDiffNodes(parentNode diffMap) { var children = parentNode.childNodes; var needToReplaceNodes; var diffTagName; for(var i=0;i<children.length;i++) { if(children[i].nodeType === Node.COMMENT_NODE && (diffTagName = children[i].nodeValue.match(/wnsdiff-?(\w*)-end/))) { if(needToReplaceNodes) { needToReplaceNodes.push(children[i]); diffMap['{' + diffTagName[1] + '}'] = needToReplaceNodes; } needToReplaceNodes = null; } else if(children[i].nodeType === Node.COMMENT_NODE && children[i].nodeValue.match(/wnsdiff-?(\w*)/)) { needToReplaceNodes = []; needToReplaceNodes.push(children[i]); } else { if(needToReplaceNodes) { needToReplaceNodes.push(children[i]); } else { findDiffNodes(children[i] diffMap); } } } } function doCb() { var cur; while(cur = waitingCb.shift()) cur(); done = true; } HYB.ready = function(cb) { if(done) { cb(); } else { waitingCb.push(cb); } }; var t1 = new Date(); window.silentCallback = function(alreadyCall) { clearTimeout(timeoutId); if(!timeout) { reportMd({ fromId : mdReport.fromId toId : mdReport.toId interfaceId : mdReport.interfaceId code : alreadyCall ? 2 : 0 type : 0 delay : new Date() - t1 }); } var data = window._websoPageData; console.log('webso2.0: silentCallback执行 _WebSoNetTime: ' + window._WebSoNetTime + ' _WebSoLocalTime' + window._WebSoLocalTime + ' _websoPageData:' + (data ? '有' : '无')); setTimeout(function() { if(data) { if(data.code === 1 && data.type === 'silent') { data = data.data; console.log('webso2.0 data: ' data); var diffMap = window.diffMap = {}; findDiffNodes(document diffMap); console.log('webso2.0 diffmap: ' diffMap); var scriptIdx = 0; var scriptPrefix = 'websoScript'; for(var i in diffMap) { if(diffMap.hasOwnProperty(i) && data[i]) { console.log(i); var nodes = diffMap[i]; for(var j=0;j<nodes.length;j++) { if(j === nodes.length - 1) { var newCtn = data[i]; var scriptMap = {}; newCtn = newCtn.replace(/<script[^>]*?>([\s\S]*?)<\/script>/ig function(scriptHtml scriptCtn){ var tempId = scriptPrefix + scriptIdx++; scriptMap[tempId] = scriptCtn; return '<scr' + 'ipt id="' + tempId + '"></' + 'script>'; }); nodes[j].parentNode.insertBefore(document.createElement('div') nodes[j]).outerHTML = newCtn; nodes[j].parentNode.removeChild(nodes[j]); for(var scriptId in scriptMap) { if(scriptMap.hasOwnProperty(scriptId)) { var el = document.getElementById(scriptId); var scriptDom = document.createElement('script'); scriptDom.type = 'text/javascript'; scriptDom.innerHTML = scriptMap[scriptId]; el.parentNode.replaceChild(scriptDom el); } } } else { nodes[j].parentNode.removeChild(nodes[j]); } } } } } } console.log('webso2.0: silent更新dom结束 执行ready里面的callback'); if(data && data.noTimeout) { doCb(); } else { setTimeout(doCb 0); } } 0); return data; }; if(HYB.offline === 'silent' && HYB.supportSilent) { consol<!DOCTYPE html> <html style=""> <head> <meta charset="UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> {title} {csp} {base} <meta name="format-detection" content="telephone=no" /> <meta name="HandheldFriendly" content="True" /> <meta name="MobileOptimized" content="320" /> <meta name="viewport" id="viewport" content="width=device-widthinitial-scale=1minimum-scale=1 maximum-scale=1 user-scalable=no viewport-fit=cover"/> <meta name="x5-fast-scroller" content="disable" /> <meta name="tags" content="sea2.1" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <link rel="Shortcut Icon" href="//qzonestyle.gtimg.cn/qzone_v6/img/favicon.ico?max_age=31536000" type="image/x-icon" /> <script> if(!window.navigator) window.navigator = {}; </script>{envData} {hybdata} <script> HYB.loadTimes.startLoad = +new Date(); </script><script data-content="webso"> (function() { var waitingCb = []; var done; var timeoutId; var timeout; var mdReport = { fromId: 204971707 toId: 211006088 interfaceId: HYB.browserInfo.platform === 'ios' ? 104979953 : 104979954 }; function reportMd(mdInfo opt) { mdInfo = mdInfo || {}; opt = opt || {}; if (!mdInfo || !mdInfo.fromId || !mdInfo.toId || !mdInfo.interfaceId) return; if (Math.random() >= (opt.rate || 0.1)) return; new Image().src = 'https://h5.qzone.qq.com/report/md?' + toUrlParams(mdInfo) + '&r=' + Math.random(); } function toUrlParams(obj) { var arr = [] k; for (k in obj) if (obj.hasOwnProperty(k)) arr.push(encodeURIComponent(k) + '=' + encodeURIComponent(obj[k])); return arr.join('&'); } function findDiffNodes(parentNode diffMap) { var children = parentNode.childNodes; var needToReplaceNodes; var diffTagName; for(var i=0;i<children.length;i++) { if(children[i].nodeType === Node.COMMENT_NODE && (diffTagName = children[i].nodeValue.match(/wnsdiff-?(\w*)-end/))) { if(needToReplaceNodes) { needToReplaceNodes.push(children[i]); diffMap['{' + diffTagName[1] + '}'] = needToReplaceNodes; } needToReplaceNodes = null; } else if(children[i].nodeType === Node.COMMENT_NODE && children[i].nodeValue.match(/wnsdiff-?(\w*)/)) { needToReplaceNodes = []; needToReplaceNodes.push(children[i]); } else { if(needToReplaceNodes) { needToReplaceNodes.push(children[i]); } else { findDiffNodes(children[i] diffMap); } } } } function doCb() { var cur; while(cur = waitingCb.shift()) cur(); done = true; } HYB.ready = function(cb) { if(done) { cb(); } else { waitingCb.push(cb); } }; var t1 = new Date(); window.silentCallback = function(alreadyCall) { clearTimeout(timeoutId); if(!timeout) { reportMd({ fromId : mdReport.fromId toId : mdReport.toId interfaceId : mdReport.interfaceId code : alreadyCall ? 2 : 0 type : 0 delay : new Date() - t1 }); } var data = window._websoPageData; console.log('webso2.0: silentCallback执行 _WebSoNetTime: ' + window._WebSoNetTime + ' _WebSoLocalTime' + window._WebSoLocalTime + ' _websoPageData:' + (data ? '有' : '无')); setTimeout(function() { if(data) { if(data.code === 1 && data.type === 'silent') { data = data.data; console.log('webso2.0 data: ' data); var diffMap = window.diffMap = {}; findDiffNodes(document diffMap); console.log('webso2.0 diffmap: ' diffMap); var scriptIdx = 0; var scriptPrefix = 'websoScript'; for(var i in diffMap) { if(diffMap.hasOwnProperty(i) && data[i]) { console.log(i); var nodes = diffMap[i]; for(var j=0;j<nodes.length;j++) { if(j === nodes.length - 1) { var newCtn = data[i]; var scriptMap = {}; newCtn = newCtn.replace(/<script[^>]*?>([\s\S]*?)<\/script>/ig function(scriptHtml scriptCtn){ var tempId = scriptPrefix + scriptIdx++; scriptMap[tempId] = scriptCtn; return '<scr' + 'ipt id="' + tempId + '"></' + 'script>'; }); nodes[j].parentNode.insertBefore(document.createElement('div') nodes[j]).outerHTML = newCtn; nodes[j].parentNode.removeChild(nodes[j]); for(var scriptId in scriptMap) { if(scriptMap.hasOwnProperty(scriptId)) { var el = document.getElementById(scriptId); var scriptDom = document.createElement('script'); scriptDom.type = 'text/javascript'; scriptDom.innerHTML = scriptMap[scriptId]; el.parentNode.replaceChild(scriptDom el); } } } else { nodes[j].parentNode.removeChild(nodes[j]); } } } } } } console.log('webso2.0: silent更新dom结束 执行ready里面的callback'); if(data && data.noTimeout) { doCb(); } else { setTimeout(doCb 0); } } 0); return data; }; if(HYB.offline === 'silent' && HYB.supportSilent) { consol<!DOCTYPE html> <html style=""> <head> <meta charset="UTF-8"> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> {title} {csp} {base} <meta name="format-detection" content="telephone=no" /> <meta name="HandheldFriendly" content="True" /> <meta name="MobileOptimized" content="320" /> <meta name="viewport" id="viewport" content="width=device-widthinitial-scale=1minimum-scale=1 maximum-scale=1 user-scalable=no viewport-fit=cover"/> <meta name="x5-fast-scroller" content="disable" /> <meta name="tags" content="sea2.1" /> <meta name="apple-mobile-web-app-status-bar-style" content="black" /> <link rel="Shortcut Icon" href="//qzonestyle.gtimg.cn/qzone_v6/img/favicon.ico?max_age=31536000" type="image/x-icon" /> <script> if(!window.navigator) window.navigator = {}; </script>{envData} {hybdata} <script> HYB.loadTimes.startLoad = +new Date(); </script><script data-content="webso"> (function() { var waitingCb = []; var done; var timeoutId; var timeout; var mdReport = { fromId: 204971707 toId: 211006088 interfaceId: HYB.browserInfo.platform === 'ios' ? 104979953 : 104979954 }; function reportMd(mdInfo opt) { mdInfo = mdInfo || {}; opt = opt || {}; if (!mdInfo || !mdInfo.fromId || !mdInfo.toId || !mdInfo.interfaceId) return; if (Math.random() >= (opt.rate || 0.1)) return; new Image().src = 'https://h5.qzone.qq.com/report/md?' + toUrlParams(mdInfo) + '&r=' + Math.random(); } function toUrlParams(obj) { var arr = [] k; for (k in obj) if (obj.hasOwnProperty(k)) arr.push(encodeURIComponent(k) + '=' + encodeURIComponent(obj[k])); return arr.join('&'); } function findDiffNodes(parentNode diffMap) { var children = parentNode.childNodes; var needToReplaceNodes; var diffTagName; for(var i=0;i<children.length;i++) { if(children[i].nodeType === Node.COMMENT_NODE && (diffTagName = children[i].nodeValue.match(/wnsdiff-?(\w*)-end/))) { if(needToReplaceNodes) { needToReplaceNodes.push(children[i]); diffMap['{' + diffTagName[1] + '}'] = needToReplaceNodes; } needToReplaceNodes = null; } else if(children[i].nodeType === Node.COMMENT_NODE && children[i].nodeValue.match(/wnsdiff-?(\w*)/)) { needToReplaceNodes = []; needToReplaceNodes.push(children[i]); } else { if(needToReplaceNodes) { needToReplaceNodes.push(children[i]); } else { findDiffNodes(children[i] diffMap); } } } } function doCb() { var cur; while(cur = waitingCb.shift()) cur(); done = true; } HYB.ready = function(cb) { if(done) { cb(); } else { waitingCb.push(cb); } }; var t1 = new Date(); window.silentCallback = function(alreadyCall) { clearTimeout(timeoutId); if(!timeout) { reportMd({ fromId : mdReport.fromId toId : mdReport.toId interfaceId : mdReport.interfaceId code : alreadyCall ? 2 : 0 type : 0 delay : new Date() - t1 }); } var data = window._websoPageData; console.log('webso2.0: silentCallback执行 _WebSoNetTime: ' + window._WebSoNetTime + ' _WebSoLocalTime' + window._WebSoLocalTime + ' _websoPageData:' + (data ? '有' : '无')); setTimeout(function() { if(data) { if(data.code === 1 && data.type === 'silent') { data = data.data; console.log('webso2.0 data: ' data); var diffMap = window.diffMap = {}; findDiffNodes(document diffMap); console.log('webso2.0 diffmap: ' diffMap); var scriptIdx = 0; var scriptPrefix = 'websoScript'; for(var i in diffMap) { if(diffMap.hasOwnProperty(i) && data[i]) { console.log(i); var nodes = diffMap[i]; for(var j=0;j<nodes.length;j++) { if(j === nodes.length - 1) { var newCtn = data[i]; var scriptMap = {}; newCtn = newCtn.replace(/<script[^>]*?>([\s\S]*?)<\/script>/ig function(scriptHtml scriptCtn){ var tempId = scriptPrefix + scriptIdx++; scriptMap[tempId] = scriptCtn; return '<scr' + 'ipt id="' + tempId + '"></' + 'script>'; }); nodes[j].parentNode.insertBefore(document.createElement('div') nodes[j]).outerHTML = newCtn; nodes[j].parentNode.removeChild(nodes[j]); for(var scriptId in scriptMap) { if(scriptMap.hasOwnProperty(scriptId)) { var el = document.getElementById(scriptId); var scriptDom = document.createElement('script'); scriptDom.type = 'text/javascript'; scriptDom.innerHTML = scriptMap[scriptId]; el.parentNode.replaceChild(scriptDom el); } } } else { nodes[j].parentNode.removeChild(nodes[j]); } } } } } } console.log('webso2.0: silent更新dom结束 执行ready里面的callback'); if(data && data.noTimeout) { doCb(); } else { setTimeout(doCb 0); } } 0); return data; }; if(HYB.offline === 'silent' && HYB.supportSilent) { consolwebso"> (function() { var waitingCb = []; var done; var timeoutId; var timeout; var mdReport = { fromId: 204971707 toId: 211006088 interfaceId: HYB.browserInfo.platform === 'ios' ? 104979953 : 104979954 }; function reportMd(mdInfo opt) { mdInfo = mdInfo || {}; opt = opt || {}; if (!mdInfo || !mdInfo.fromId || !mdInfo.toId || !mdInfo.interfaceId) return; if (Math.random() >= (opt.rate || 0.1)) return; new Image().src = 'https://h5.qzone.qq.com/report/md?' + toUrlParams(mdInfo) + '&r=' + Math.random(); } function toUrlParams(obj) { var arr = [] k; for (k in obj) if (obj.hasOwnProperty(k)) arr.push(encodeURIComponent(k) + '=' + encodeURIComponent(obj[k])); return arr.join('&'); } function findDiffNodes(parentNode diffMap) { var children = parentNode.childNodes; var needToReplaceNodes; var diffTagName; for(var i=0;i<children.length;i++) { if(children[i].nodeType === Node.COMMENT_NODE && (diffTagName = children[i].nodeValue.match(/wnsdiff-?(\w*)-end/))) { if(needToReplaceNodes) { needToReplaceNodes.push(children[i]); diffMap['{' + diffTagName[1] + '}'] = needToReplaceNodes; } needToReplaceNodes = null; } else if(children[i].nodeType === Node.COMMENT_NODE && children[i].nodeValue.match(/wnsdiff-?(\w*)/)) { needToReplaceNodes = []; needToReplaceNodes.push(children[i]); } else { if(needToReplaceNodes) { needToReplaceNodes.push(children[i]); } else { findDiffNodes(children[i] diffMap); } } } } function doCb() { var cur; while(cur = waitingCb.shift()) cur(); done = true; } HYB.ready = function(cb) { if(done) { cb(); } else { waitingCb.push(cb); } }; var t1 = new Date(); window.silentCallback = function(alreadyCall) { clearTimeout(timeoutId); if(!timeout) { reportMd({ fromId : mdReport.fromId toId : mdReport.toId interfaceId : mdReport.interfaceId code : alreadyCall ? 2 : 0 type : 0 delay : new Date() - t1 }); } var data = window._websoPageData; console.log('webso2.0: silentCallback执行 _WebSoNetTime: ' + window._WebSoNetTime + ' _WebSoLocalTime' + window._WebSoLocalTime + ' _websoPageData:' + (data ? '有' : '无')); setTimeout(function() { if(data) { if(data.code === 1 && data.type === 'silent') { data = data.data; console.log('webso2.0 data: ' data); var diffMap = window.diffMap = {}; findDiffNodes(document diffMap); console.log('webso2.0 diffmap: ' diffMap); var scriptIdx = 0; var scriptPrefix = 'websoScript'; for(var i in diffMap) { if(diffMap.hasOwnProperty(i) && data[i]) { console.log(i); var nodes = diffMap[i]; for(var j=0;j<nodes.length;j++) { if(j === nodes.length - 1) { var newCtn = data[i]; var scriptMap = {}; newCtn = newCtn.replace(/<script[^>]*?>([\s\S]*?)<\/script>/ig function(scriptHtml scriptCtn){ var tempId = scriptPrefix + scriptIdx++; scriptMap[tempId] = scriptCtn; return '<scr' + 'ipt id="' + tempId + '"></' + 'script>'; }); nodes[j].parentNode.insertBefore(document.createElement('div') nodes[j]).outerHTML = newCtn; nodes[j].parentNode.removeChild(nodes[j]); for(var scriptId in scriptMap) { if(scriptMap.hasOwnProperty(scriptId)) { var el = document.getElementById(scriptId); var scriptDom = document.createElement('script'); scriptDom.type = 'text/javascript'; scriptDom.innerHTML = scriptMap[scriptId]; el.parentNode.replaceChild(scriptDom el); } } } else { nodes[j].parentNode.removeChild(nodes[j]); } } } } } } console.log('webso2.0: silent更新dom结束 执行ready里面的callback'); if(data && data.noTimeout) { doCb(); } else { setTimeout(doCb 0); } } 0); return data; }; if(HYB.offline === 'silent' && HYB.supportSilent) { consol

南瓜的无敌提示您:看后求收藏(卧龙小说网http://www.wolongxs.com),接着再看更方便。

好书推荐:《我的剧本世界在自主运行》《我是舰娘》《我的师妹是妖女》《交错世界之学院都市》《认清现实后,她们开始追夫火葬场》《好徒儿你就饶了为师伐》

目录